package com.app.utils.impl.labour;

import android.os.Build;

import androidx.annotation.RequiresApi;

import com.app.utils.impl.IConsole;
import com.app.utils.impl.Strategy;
import com.zndroid.utils.XUtils;
import com.zndroid.utils.impl.StringUtil;

import java.nio.charset.StandardCharsets;

/**
 * Created by lzy on 2022/2/21.
 */
public class StringUtilStrategy extends Strategy {
    public StringUtilStrategy(IConsole iConsole) {
        super(iConsole);
    }

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    @Override
    public void doing() {
        StringUtil util = XUtils.create().stringUtil();

        iConsole.console("hexString2Byte(‘1F2D3C6A’)", util.hexString2Byte("1F2D3C6A").toString());
        iConsole.console("byte2HexString(‘haha’)", util.byte2HexString("haha".getBytes(StandardCharsets.UTF_8)));
    }
}
